#include <ctype.h>
#include <limits.h>
#include <math.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>

/**
 * Definition for a binary tree node.
 */
struct TreeNode {
	int val;
	struct TreeNode* left;
	struct TreeNode* right;
};
typedef struct TreeNode treeNode, *treenode;

int minDepth(struct TreeNode* root);

int main()
{
	return 0;
}

int minDepth(struct TreeNode* root)
{
	if (!root) return 0;
	treenode left = root->left, right = root->right;
	if (!left && !right) return 1;
	if (left && right) return fmin(minDepth(left), minDepth(right)) + 1;
	return (left ? minDepth(left) : minDepth(right)) + 1;
}
